<template>
	<view class="page">
		<view class="chat-box">
			<view class="c-gray ta-center mb-40">以下是30天内的聊天记录</view>
			<job-card />
			<view class="pd-20">
				<chat-item :data="item" v-for="item,index in chatList" :key="index" />
			</view>
		</view>
		<view class="fixed-box">
			<submit-form />
		</view>
	</view>
</template>

<script>
	import JobCard from './components/chat/job-card'
	import ChatItem from './components/chat/chat-item'
	import SubmitForm from './components/chat/submit-form'
	export default {
		components: {
			JobCard,
			ChatItem,
			SubmitForm
		},
		data() {
			return {
				jobData: null,
				chatList: [{
						from: 'applicant',
						message_type: 'text',
						content: '你好，请问你们还在招聘前端吗？',
						time: '2025-11-30 07:30'
					},
					{
						from: 'applicant',
						message_type: 'text',
						content: '我有3年的前端开发经验，并且有好几个项目在线上运行',
						time: '2025-11-30 07:32'
					},
					{
						from: 'interviewer',
						message_type: 'text',
						content: '招聘工作已经结束了，谢谢你的咨询，希望你早日找到工作！',
						time: '2025-12-02 12:32'
					},
					{
						from: 'applicant',
						message_type: 'text',
						content: '我有3年的前端开发经验，并且有好几个项目在线上运行',
						time: '2025-11-30 07:32'
					},
					{
						from: 'applicant',
						message_type: 'text',
						content: '我有3年的前端开发经验，并且有好几个项目在线上运行',
						time: '2025-11-30 07:32'
					},
				],
			};
		},
		onLoad() {
			const {
				id
			} = this.$Route.query
		}
	}
</script>

<style lang="scss" scoped>
	.chat-box {
		padding: 20rpx;
		padding-bottom: 114rpx;
	}

	.fixed-box {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #fff;
	}
</style>